//获取应用实例
const app = getApp();
// 引入AES.js
var baseJs = require("../../common/base.js");
Page({

  /**
   * 页面的初始数据
   */
  data: {
    imgUrl: baseJs.imgUrl,
    orderId:0,
    orderData: [],
    // 
    uid:"",
  },

  /**
   * 生命周期函数--监听页面加载
   */
  onLoad: function(options) {
    // console.log(options);
    this.setData({
      uid: wx.getStorageSync('uid'),
      orderId: options.orderId,
    })
    this.GetOrderDetail();
  },

 
  GetOrderDetail: function() {
    var that = this;
    var uid = this.data.uid;
    var orderId = this.data.orderId;
    var orderData = this.data.orderData;
    wx.request({
      url: baseJs.api + baseJs.encryUrl("method=GetOrderDetail&UID=" + uid + "&OrderID=" + orderId),
      success: function(res) {
        orderData = JSON.parse(baseJs.decryUrl(res.data)).ResultData;
        that.setData({
          orderData: orderData,
        })
        console.log(orderData);
      }
    })

  },
  // 
})